/* Copyright (C) 2012  	Mathieu Marleix <mathieu.marleix@aerian.fr>
 * 						Sébastien Dufay
 * 						Romain Noel
 * 						Nicolas Dennewald
 * 						Slim Aloui
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.esiee.mobiliteam.data;

import java.io.Serializable;

/**
 * Classe gérant les différentes catégories de chaque item récupéré via
 * le flux RSS.
 * @author Marleix Mathieu
 * @author Dufay Sébastien
 * @author Romain Noel
 * @author Nicolas Dennewald
 * @author Slim Aloui
 */
public class RSSItem  implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public static final String TITLE="title";
	public static final String PUBDATE="pubdate";
	public static final String DATE="date";
	private String title = null;
	private String description = null;
	private String link = null;
	private String category = null;
	private String pubdate = null;
	private String date = null;
	private String periode = null;
	
	public RSSItem()
	{
	}
	public void setTitle(String title)
	{
		this.title = title;
	}
	public	void setDescription(String description)
	{
		this.description = description;
	}
	public	void setLink(String link)
	{
		this.link = link;
	}
	public	void setCategory(String category)
	{
		this.category = category;
	}
	public	void setPubDate(String pubdate)
	{
		this.pubdate = pubdate;
	}
	public String getTitle()
	{
		return title;
	}
	public	String getDescription()
	{
		return description;
	}
	public	String getLink()
	{
		return link;
	}
	public String getCategory()
	{
		return category;
	}
	public String getPubDate()
	{
		return pubdate;
	}
	public String toString()
	{
		if (title.length() > 20)
		{
			return title.substring(0, 42) + "...";
		}
		return title;
	}
	public void setDate(String date) {
		this.date = date;
	}
	public String getDate() {
		return date;
	}
	public void setPeriode(String periode) {
		// TODO Auto-generated method stub
		this.periode = periode;
	}
	public String getPeriode(){
		return periode;
	}
}
